<?php
/**
 * Created by JetBrains PhpStorm.
 * User: ncduc
 * Date: 6/19/13
 * Time: 4:32 PM
 * To change this template use File | Settings | File Templates.
 */
function smarty_validate_criteria_isValidCaptcha($value, $empty, &$params, &$formvars) {
    if (empty($_SESSION['captcha']) || trim(strtolower($value)) != $_SESSION['captcha']) {
       return false;
    //   echo $error;
    }
    unset($_SESSION['captcha']);
    return true;
}